home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc1 / vwrlds21.lha / VWorlds21 / Install < prev    next >
Text File  |  1996-05-11  |  2KB  |  104 lines

  1. ; Install VWorlds V2.1
  2. ; This script installs VWorlds.  Checks for needed libraries, OS version
  3. ; CPU, adds an assign to S:UserStartup, and installs VWorlds.config to S:
  4.  
  5. (transcript "Installing VWorlds...")
  6.  
  7. (set #intromsg (cat    "\nThis installs VWorlds V2.1 on your hard\n"
  8.             "disk and checks your Kickstart and CPU.\n"))
  9.  
  10. (message #intromsg)
  11.  
  12.     ;Check to see what version of the OS we're running on.
  13. (if (< (/ (getversion) 65536) 39)
  14.     (
  15.     (if (<> 1 (askbool (help @askbool-help) (prompt (cat "You must be using Kickstart 3.0+ to run VWorlds.\n"
  16.                     "\n"
  17.                     "Do you wish to continue anyway?\n"))))
  18.  
  19.         (
  20.         (abort "Aborting as the Kickstart is not sufficient.")
  21.         )
  22.     )
  23.     )
  24. )
  25.  
  26.  
  27.     ; Check to see what CPU we're running on.
  28. (if (>= 68020 (database "cpu"))
  29.     (
  30.     (if (<> 1 (askbool (help @askbool-help) (prompt (cat
  31.                     "\nYou need a 68020 CPU or better to run VWorlds.\n"
  32.                     "\nDo you wish to continue anyway?\n"))))
  33.         (
  34.         (abort "Aborting as the CPU is not sufficient.")
  35.         )
  36.     )
  37.     )
  38. )
  39.  
  40.     ;Get the destination directory from the user
  41. (set wheredir
  42.     (askdir
  43.     (prompt "Select a directory where you would like to install "
  44.         "VWorlds. (A drawer will be created there)")
  45.     (help @askdir-help)
  46.     (default @default-dest)
  47.     )
  48. )
  49.  
  50.     ;Create the directory for VWorlds
  51. (set wheredir (tackon wheredir "VWorlds2.1"))
  52. (makedir wheredir (infos))
  53.  
  54.  
  55. (working "Installing VWorlds...")
  56.     ;Copy all of the files over to the destination
  57. (copyfiles
  58.     (prompt "")
  59.     (help @copyfiles-help)
  60.     (pattern "~(Install|Install.info)")
  61.     (infos)
  62.     (source (pathonly @icon))
  63.     (dest wheredir)
  64. )
  65.  
  66.     ;Add an assign to user startup
  67. (startup "VWORLDS"
  68.     (prompt "I need to add an assign to your\n\"s:user-startup\" file.")
  69.     (help @startup-help)
  70.     (command ("assign VWORLDS: \"%s\"\n" wheredir))
  71. )
  72.  
  73.     ;Copy vworlds.config file to S:
  74. (if (exists "s:vworlds.config")
  75.     (
  76.     (if (<> (getsize "s:vworlds.config") 298)
  77.         (
  78.         (copyfiles (prompt "Copying new vworlds.config") (help @copyfiles-help) 
  79.             (source "vworlds.config") (dest "s:") (files))
  80.         )
  81.  
  82.         (
  83.         (if (askbool (help @askbool-help) (prompt     
  84.             (cat    "\nMay I copy the new vworlds.config over\n"
  85.                 "your current vworlds.config file?\n")))
  86.                 (
  87.                 (copyfiles (prompt "Copying new vworlds.config") (help @copyfiles-help) 
  88.                     (source "vworlds.config") (dest "s:") (files))
  89.                 )
  90.  
  91.             )
  92.         )
  93.         )
  94.     )
  95.  
  96.     (
  97.     (copyfiles (prompt "Copying new vworlds.config") (help @copyfiles-help) 
  98.         (source "vworlds.config") (dest "s:"))
  99.     )
  100. )
  101.  
  102. (exit "Please reboot your computer before running\nVWorlds.")
  103.  
  104.